<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    div {
      /*
        元素内容超出元素范围时，超出部分怎么处理
         ● visible 显示超出范围的内容
         ● hidden  隐藏超出范围的内容
         ● scroll  无论元素内容是否超出元素范围，都显示滚动条
         ● auto    元素内容超出元素范围时，显示滚动条
       */
      overflow: auto;
      width: 400px;
      height: 400px;
    }

    div>div {
      width: 500px;
      height: 100px;
    }

    div>div:nth-child(1) {
      background-image: linear-gradient(to right, red, orange);
    }

    div>div:nth-child(2) {
      background-image: linear-gradient(to right, orange, yellow);
    }

    div>div:nth-child(3) {
      background-image: linear-gradient(to right, yellow, green);
    }

    div>div:nth-child(4) {
      background-image: linear-gradient(to right, green, cyan);
    }

    div>div:nth-child(5) {
      background-image: linear-gradient(to right, cyan, blue);
    }

    div>div:nth-child(6) {
      background-image: linear-gradient(to right, blue, purple);
    }

    div>div:nth-child(7) {
      background-image: linear-gradient(to right, purple, red);
    }
  </style>
</head>

<body>
  <div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
  </div>
</body>

</html>